package com.meteor.user.vo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import com.meteor.framework.common.base.AutoEntity;
import com.meteor.framework.common.utils.DateUtils;
import com.meteor.user.entity.SysDepartment;
import com.meteor.user.entity.SysMerchant;
import com.meteor.user.entity.SysOrg;
import com.meteor.user.entity.SysUser;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * 员工排班
 *
 * @author lynn
 * @date 2024/1/22
 */

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("user_working")
public class UserWorkingVO implements Serializable, TransPojo {

    @Schema(description = "排班日期")
    private Date workingDate;

    @Schema(description = "排班星期几")
    private String week;

    @Schema(description = "排班开始时间")
    private String startTime;

    @Schema(description = "排班结束时间")
    private String endTime;

    @Schema(description = "值班人id")
    @Trans(type = TransType.SIMPLE, target = SysUser.class, fields = "realName", ref = "name")
    private String watchUserId;

    @Schema(description = "值班人")
    private String watchUserName;

    @Schema(description = "值班部门id")
    @Trans(type = TransType.SIMPLE, target = SysDepartment.class, fields = "name", ref = "watchDepartmentName")
    private String watchDepartmentId;

    @Schema(description = "值班部门")
    private String watchDepartmentName;

    @Schema(description = "商户名称")
    private String merchantName;

    @Schema(description = "商户id")
    @Trans(type = TransType.SIMPLE, target = SysMerchant.class, fields = "name", ref = "merchantName")
    private String merchantId;

    @Schema(description = "组织id")
    @Trans(type = TransType.SIMPLE, target = SysOrg.class, fields = "name", ref = "orgName")
    private String orgId;

    @Schema(description = "组织名称")
    private String orgName;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date createTime;


}
